package net.yla.smartbus.module.ba.setting.mapper;

import net.yla.smartbus.module.ba.setting.entity.SettingDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface SettingDOMapper {

    //getInt32
    SettingDO getInt32(String name);

    //getInt64
    SettingDO getInt64(String name);

    //getString
    SettingDO getString(String name);

    //getDouble
    SettingDO getDouble(String name);

    //getDateTime
    SettingDO getDateTime(String name);

    //getInt32ByUrl
    SettingDO getInt32ByUrl(String name, String url);

    //getInt64ByUrl
    SettingDO getInt64ByUrl(String name, String url);

    //getStringByUrl
    SettingDO getStringByUrl(String name, String url);

    //getDoubleByUrl
    SettingDO getDoubleByUrl(String name, String url);

    //getDateTimeByUrl
    SettingDO getDateTimeByUrl(String name, String url);

    //新增配置
    int insertSetting(String name, Object value);

    int insertSettingByUrl(String name, String url, Object value);

    //更新配置
    int updateSetting(String name, Object value);

    int updateSettingByUrl(String name, String url, Object value);

    //根据name查找
    SettingDO getByName(String name);

    //根据name url查找
    SettingDO getByUrl(String name, String url);

}